package com.paiai.lslease.dao.doorrecord;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.paiai.lslease.auto.model.AppLockOpenrecord;
import com.paiai.lslease.model.bo.query.AppLockOpenrecordQuery;
import com.paiai.lslease.model.bo.query.AppUserLockInfoQuery;

/** 
* @author chenmfa
* @version 创建时间：2017年10月20日 上午11:44:12 
* @description
*/
@Service("openDoorDao")
public class OpenDoorDaoImpl implements OpenDoorDao {
  
  @Autowired
  SqlMapClient sqlMapClient;
  /**
   * @description 查询开门记录分页
   * @return
   * @throws SQLException
   */
  @SuppressWarnings("unchecked")
  @Override
  public List<AppLockOpenrecord> queryOpenDoorRecord(AppLockOpenrecordQuery query) throws SQLException {
    return sqlMapClient.queryForList("app_door_record.queryOpenDoorRecord",query);
  }
  /**
   * @description 查询用户的锁具id列表
   * @return
   * @throws SQLException
   */
  public String queryUserLockList(AppUserLockInfoQuery query) throws SQLException{
    return (String)sqlMapClient.queryForObject("app_door_record.queryUserLockList",query);
  }
}
